package net.hn.hnms.biz.training.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@NoArgsConstructor
@TableName("personnel_certificate")
@ApiModel(value = "全员持证实体类")
public class PersonnelCertificate {

//  @ExcelIgnore
//  @ApiModelProperty(value = "ID")
  @TableId(type = IdType.ASSIGN_UUID)
  private String id;

  @ExcelProperty(value = "持证人")
  @ApiModelProperty(value = "持证人")
//  @NotBlank(message = "持证人不能为空")
  private String holderName;

  @ApiModelProperty(value = "ID")
  //@TableId(type = IdType.ASSIGN_UUID)
  @ExcelProperty(value = "员工编号")
//  @TableId()
//  @ApiModelProperty(value = "员工编号")
//  @NotBlank(message = "员工编号不能为空")
  //@Length(max = 8,message = "员工编号长度不能超过8个字符")
  private String employeeId;

  @ExcelProperty(value = "职务")
  @ApiModelProperty(value = " 职务")
//  @NotBlank(message = "职务不能为空")
  private String post;

  @ExcelProperty(value = "任职时间")
  @ApiModelProperty(value = "任职时间")
  private Date employmentPeriod;

  @ExcelProperty(value = "参加工作时间")
  @ApiModelProperty(value = "参加工作时间")
  private Date workTime;

  @ExcelProperty(value = "学历")
  @ApiModelProperty(value = "学历")
  private String education;

  @ExcelProperty(value = "所学专业")
  @ApiModelProperty(value = "所学专业")
  private String major;

  @ExcelProperty(value = "人员类别")
  @ApiModelProperty(value = "人员类别")
  private String personnelCategory;

  @ExcelProperty(value = "证件编号")
  @ApiModelProperty(value = "证件编号")
  @NotBlank(message = "证件编号不能为空")
  private String idNumber;

  @ExcelProperty(value = "发证日期")
  @ApiModelProperty(value = "发证日期")
  private Date openingDate;

  @ExcelProperty(value = "到期日期")
  @ApiModelProperty(value = "到期日期")
  private Date dateDue;

  @ExcelProperty(value = "是否在其他单位兼职")
  @ApiModelProperty(value = "是否在其他单位兼职")
  private String isPluralistic;

  @ExcelProperty(value = "职称")
  @ApiModelProperty(value = "职称")
  private String rank;

  @ExcelProperty(value = "职称专业")
  @ApiModelProperty(value = "职称专业")
  private String rankMajor;

  @ExcelProperty(value = "证件状态")
  @ApiModelProperty(value = "证件状态")
//  @NotBlank(message = "证件状态不能为空")
  private String certificateStatus;

  @ExcelProperty(value = "所在单位")
  @ApiModelProperty(value = "所在单位")
//  @NotBlank(message = "所在单位不能为空")
  private String workUnit;

  @ExcelProperty(value = "是否专业技术人员")
  @ApiModelProperty(value = "是否专业技术人员")
  private String isProfessionals;

  @ExcelIgnore
  @ApiModelProperty(value = "导入时间")
  private Date createTime;

  /**
   * 类型  2.安全生产管理人员持证明细 1.五职矿长与副总工程师持证明细    3.特种作业持证明细  4煤矿其他从业人员
   */
//  @ExcelProperty(value = "类型")
  @ApiModelProperty(value = "类型")
  private String type;

  @ExcelProperty(value = "姓名")
  @ApiModelProperty(value = "姓名")
  private String userName;

  @ExcelProperty(value = "备注")
  @ApiModelProperty(value = "备注")
  private String remark;

  @ExcelProperty(value = "性别")
  @ApiModelProperty(value = "性别")
  @NotBlank(message = "性别不能为空")
  private String gender;

  @ExcelProperty(value = "作业类别")
  @ApiModelProperty(value = "作业类别")
//  @NotBlank(message = "准操项目不能为空")
  private String operationCategory;
  //private String operationItem;
  @ExcelProperty(value = "准操项目")
  @ApiModelProperty(value = "准操项目")
//  @NotBlank(message = "准操项目不能为空")
  private String pilotProject;

  @ExcelProperty(value = "岗位职务")
  @ApiModelProperty(value = " 岗位职务")
//  @NotBlank(message = "职务不能为空")
  private String   postPosition = "--";

  @ExcelIgnore
  @ApiModelProperty(value = "修改时间")
  private Date updateTime;

  @ExcelIgnore
  @ApiModelProperty(value = "删除标记,0正常,1删除",hidden=true)
  @TableLogic(value = "0", delval = "1")
  @TableField(value = "del_flag", fill = FieldFill.INSERT)
  private String delFlag;
}
